﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using NetCMS.DALFactory;
using NetCMS.Model;

namespace NetCMS.Content
{
    public class Photo
    {
        private IPhoto dal;
        public Photo()
        {
            dal = NetCMS.DALFactory.DataAccess.CreatePhoto();
        }
        #region photo.aspx
        public DataTable sel_getUserInfo(string PhotoalbumID)
        {
            return dal.sel_getUserInfo(PhotoalbumID);
        }
        #endregion

        #region photo_add.aspx
        public DataTable sel_getPhotoInfo(string UserNum)
        {
            return dal.sel_getPhotoInfo(UserNum);
        }
        public DataTable sel_getPhotoId()
        {
            return dal.sel_getPhotoId();
        }
        public int Add(PhotoInfo Pho, string UserNum, string PhotoalbumID, string PhotoUrl, string PhotoID)
        {
            return dal.Add(Pho, UserNum, PhotoalbumID, PhotoUrl, PhotoID);
        }
        #endregion

        #region photo_del.aspx
        public int Delete(string PhotoID)
        {
            return dal.Delete(PhotoID);
        }
        #endregion

        #region photo_up.aspx
        public DataTable sel_getUserPhoto(string PhotoID)
        {
            return dal.sel_getUserPhoto(PhotoID);
        }
        public int Update(string PhotoName, DateTime PhotoTime, string PhotoalbumID, string PhotoContent, string PhotoUrl1, string PhotoIDs)
        {
            return dal.Update(PhotoName, PhotoTime, PhotoalbumID, PhotoContent, PhotoUrl1, PhotoIDs);
        }
        #endregion

        #region Photoalbum.aspx
        public DataTable sel_getPhotoClass(string UserNum)
        {
            return dal.sel_getPhotoClass(UserNum);
        }
        public int add_photoalBum(PhotoAlbumInfo Pb, string UserNum)
        {
            return dal.add_photoalBum(Pb, UserNum);
        }
        #endregion

        #region Photoalbum_up.aspx
        public int update_photoalBum(string PhotoalbumName, string PhotoalbumJurisdiction, string ClassID, DateTime Creatime, string PhotoalbumIDs)
        {
            return dal.update_photoalBum(PhotoalbumName, PhotoalbumJurisdiction, ClassID, Creatime, PhotoalbumIDs);
        }
        public string sel_getPhotoalBum()
        {
            return dal.sel_getPhotoalBum();
        }
        public int update_photoalBumPwd(string newpwds, string PhotoalbumIDs)
        {
            return dal.update_photoalBumPwd(newpwds, PhotoalbumIDs);
        }
        #endregion

        #region Photoalbumlist.aspx
        public int del_photoalBumById(string ID)
        {
            return dal.del_photoalBumById(ID);
        }
        public int del_photoById(string ID)
        {
            return dal.del_photoById(ID);
        }
        public string sel_sysUser(string UserNum)
        {
            return dal.sel_sysUser(UserNum);
        }
        public int sel_userPhoCount(string ID)
        {
            return dal.sel_userPhoCount(ID);
        }
        public DataTable GetPage(string UserNum, string ClassID, int PageIndex, int PageSize, out int RecordCount, out int PageCount, params SQLConditionInfo[] SqlCondition)
        {
            return dal.GetPage(UserNum, ClassID, PageIndex, PageSize, out RecordCount, out PageCount, SqlCondition);
        }
        #endregion

        #region photoclass.aspx
        public int del_phoBumById(string ID)
        {
            return dal.del_phoBumById(ID);
        }
        public int del_photoalBum(string ID)
        {
            return dal.del_photoalBum(ID);
        }
        public DataTable sel_getPhotoById(string ID)
        {
            return dal.sel_getPhotoById(ID);
        }
        public DataTable sel_disActive()
        {
            return dal.sel_disActive();
        }
        #endregion

        #region  photoclass_add.aspx
        public int add_photoalBumClass(string ClassName, string ClassID, DateTime Creatime, string UserNum, int isDisclass, string DisID)
        {
            return dal.add_photoalBumClass(ClassName, ClassID, Creatime, UserNum, isDisclass, DisID);
        }
        #endregion

        #region photoclass_up.aspx
        public string sel_phoClassName(string ClassID)
        {
            return dal.sel_phoClassName(ClassID);
        }
        public int update_phoBumClass(string ClassName, DateTime Creatime, string ClassIDs)
        {
            return dal.update_phoBumClass(ClassName, Creatime, ClassIDs);
        }
        #endregion

        public DataTable sel_photoUrl(string PhotoalbumID)
        {
            return dal.sel_photoUrl(PhotoalbumID);
        }

    }
}
